package scala.scalaClass.basic

//primary constructor
class Pizza(var pizzaSize:Int, var pizzaType:String) {
   
   //this constructor is called Auxilary constructor
   def this(aSize:Int){
      this(aSize, Pizza.DEFAULT_TYPE)
   }
   
   def this(aType: String){
      this(Pizza.DEFAULT_SIZE,aType)
   }
   
   def this(){
      this(Pizza.DEFAULT_SIZE, Pizza.DEFAULT_TYPE)
   }
   
   override def toString = s"$pizzaType has size $pizzaSize";
}

object Pizza{
   val DEFAULT_SIZE = 12
   val DEFAULT_TYPE = "TYPE"
}